<?php

namespace App\Console\Commands;

use App\Models\User;
use Illuminate\Console\Command;
use App\Supports\Withdraw\WithdrawOverChecker;

class CheckUserCache extends Command
{
    protected $signature = 'cc:check-user-cache';

    protected $description = "";

    public function handle()
    {
	    $data = $this->ask("Input User ID like: 1");

	    if (empty((int)$data)) {
            $this->error('Please input user id.');
	    	return;
	    }

	    if (!$user = User::find($data)) {
	    	$this->error('Expired User does not exist.');
	    	return;
	    }

	    $this->info(array_string($user->getCache()));
    }
}
